package com.example.demo.domain;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


@Repository
public interface CarouselRepository extends JpaRepository<Carousel,Long> {

//    @Query(value = "select u.user_name, ui.name, ui.gender,ui.description,'' as headImg from user_info u where u.id = 1",nativeQuery=true)

//    @Query(value = "select new Carousel (image_url) from Carousel")
    @Query(value = "select image_url from carousel",nativeQuery = true)
    public List<Map<String,Object>> getCustomField();
}
